package com.currency.response;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
@Api(value = "增加参数的响应请求类", tags = "增加参数响应请求类")
public class  NormalResponse<T> extends BaseResponse {
    @ApiModelProperty("参数信息")
    private T data;

    public static <T> NormalResponse<T> success(T data) {
        NormalResponse<T> res = new NormalResponse<>();
        res.setErrCode("cey0000");
        res.setErrMsg("操作成功");
        res.setData(data);
        return res;
    }
}
